using UnityEngine;
using UnityEngine.UI;

public class HomeModeSlot : SnapScrollViewElement
{
	public Image backgroundImage;

	public Image iconImage;

	public Text titleText;

	public Text descriptionText;

	public GameObject selectedObject;

	private GameModeParameters _currentModeParameters;

	public GameModeParameters CurrentModeParameters => _currentModeParameters;

	public void SetGameMode(GameModeParameters modeParameters)
	{
		_currentModeParameters = modeParameters;
		titleText.text = LocalizationManager.GetTranslation(_currentModeParameters.title);
		descriptionText.text = LocalizationManager.GetTranslation(_currentModeParameters.description);
		iconImage.sprite = _currentModeParameters.icon;
	}

	public void SetZoom(bool state)
	{
		if (state)
		{
			base.transform.localScale = Vector3.one;
		}
		else
		{
			base.transform.localScale = Vector3.one * 0.9f;
		}
	}

	public void SetSelected(bool state)
	{
		if (state)
		{
			titleText.color = Color.white;
			descriptionText.color = Color.white;
			backgroundImage.color = _currentModeParameters.color;
			iconImage.color = Color.white;
			selectedObject.SetActive(value: true);
		}
		else
		{
			titleText.color = _currentModeParameters.color;
			descriptionText.color = _currentModeParameters.color;
			backgroundImage.color = Color.black;
			iconImage.color = _currentModeParameters.color;
			selectedObject.SetActive(value: false);
		}
	}
}
